The present invention relates to motion vector detection used in motion compensative prediction coding, that is, a technique of compression coding of digital dynamic image data.
As a method of realizing image coding of dynamic images, time redundancy is reduced by using information expressing from which portion of a previous picture a given portion of a current picture is moved (i.e., a motion vector). One of methods of extracting such a motion vector is designated as a block matching method.
FIG. 16 is a diagram for showing the principle of the block matching method. In the block matching method, a target frame image (target frame) to be coded is compared with a search frame image (search frame) in which a motion vector is searched for, and a block most similar to (namely, having the highest correlation with) a coding target block in the target frame (namely, a best match block) is extracted from a search range in the search frame, thereby detecting a motion vector. This block matching method is widely used in the motion compensative prediction for image compression coding.
In the block matching method, correlation between one coding target block and plural candidate blocks within the search range in the search frame are respectively calculated, and a candidate block having the highest correlation is selected as the best match block, so that a positional difference between the best match block and the coding target block can be detected as a motion vector.
As an evaluation value indicating the correlation, an accumulation value of square errors or absolute errors is generally used. A difference between a coding target block and a candidate block is smaller as the correlation therebetween is higher. Therefore, when the accumulation value of square errors or absolute errors is used as the evaluation value, the evaluation value is smaller as the correlation is higher.
A motion vector is detected for the purpose of detecting, in the search frame, a block where a coding amount can be most effectively reduced in the motion compensative prediction coding. Accordingly, the accuracy in detecting a motion vector is one of significant performances of a motion vector detecting device. The motion vector detection is, however, a process requiring a particularly large amount of calculation in an image coding algorithm. Therefore, when the motion vector detection is realized by hardware, power consumption is disadvantageously large because the process requires a long period of time and a large hardware scale. Furthermore, a real time process of the detection using software is very difficult to execute at present. Under such circumstances, it is desired to realize motion vector detection having high accuracy and high processing efficiency.
In some of conventional motion vector detecting devices, a search range is made small with regard to an image with small movement, so as to shorten a processing time for the detection of a motion vector, and a search range is enlarged with regard to an image with large movement. Thus, the processing efficiency can be improved without degrading the detection accuracy.
For example, a motion vector detecting device disclosed in Japanese Laid-Open Patent Publication No. 8-32969 comprises means for evaluating correlation with a block in the same position as a process block, means for selectively controlling the size of a search range in accordance with the correlation evaluation of the block, and means for detecting a motion vector by evaluating correlations with respective candidate blocks in the search range. In this device, the search range is reduced as the correlation of the block in the same position is increased. As a result, a motion vector can be accurately detected with a small amount of calculation.
Such a conventional motion vector detecting device has, however, the following problems:
A picture shot by a camera or the like occasionally includes so-called pan images in which the entire image is moved in a given direction. In a pan image, a shot substance itself is not changed but the position thereof is moved in the given direction.
In the aforementioned conventional motion vector detecting device, the size of the search range is set through the correlation evaluation with a block in the same position as the process block. Therefore, for example, in a pan image, the correlation in the same position is small, and hence, a large search range is inevitably set. Also, prior to the motion vector detection, it is necessary to execute the correlation evaluation in the same position, and hence, the process can be disadvantageously complicated.